/*

_navigation.scss

Author: Byron Salau
Contributors:

This file is part of Blanc

Licenced under the MIT License (MIT)
 
Copyright (C) 2011 - 2012 Codagenic Pty. Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/

.nav, 
.nav-checkout
{
	position:relative;
	z-index:$ziNavigation;
}
.nav .primary
{
	border-top: 4px solid #d2d2d3;
	padding:4px 0;
	> li
	{
		float:left;
		display:block;
	}
}
.nav li
{
	position:relative;
	white-space:nowrap;

	a
	{
		text-decoration: none;
		display: block;
		padding: 2px 10px;
		font-size: 1.25em;
		line-height: 26px;
		font-weight: 500;
		text-transform: none;
		height: 26px;
		color:#373d3e;
		position:relative;
		z-index:101;
	}

	&:hover
	{
		background:$foreColor;
	}
}

// Pointer
.nav li.active:before,
.nav li.active:after 
{
	content:'';
	position:absolute;
	bottom:-4px;
	left:62%;
	margin-left:-14px;
	width:0;
	height:0;
	width: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #d2d2d3;
    z-index:100;
}
.nav li.active:after
{
	bottom:-5px;
	border-bottom: 6px solid #fff;
}

.nav li.active a
{
	font-weight:bold;
}

// Nav in fixed position
.nav.fixed 
{
	position:fixed;
	top:0;
	left:50%;
	margin-left:-470px;
	background-color:#fff;
	border-top:0 none;
	width:960px;
	@include box-shadow(false, 0, 0, 2px, 0, rgba(0,0,0,0.2));
}


// Sub navigation
.nav .sub ul 
{
	display:block;
	position:absolute;
	z-index:101;
	left:0;
	top:300;
	padding:3px 0 13px 0;
	margin:0;
	background-color:$foreColor;
	visibility:hidden;
	opacity:0;

			 transition:visibility 0s linear 0.1s,opacity 0.1s linear;
	 -webkit-transition:visibility 0s linear 0.1s,opacity 0.1s linear;
		-moz-transition:visibility 0s linear 0.1s,opacity 0.1s linear;
		  -o-transition:visibility 0s linear 0.1s,opacity 0.1s linear;
}
.nav .sub:hover ul
{
	//display:block;
	visibility:visible;
	opacity:1;
			transition-delay:0s;
	-webkit-transition-delay:0s;
	   -moz-transition-delay:0s;
	   	 -o-transition-delay:0s;
}
.nav .sub li
{
	display:block;
	float:none;
}
.nav li.active li.active::before, 
.nav li.active li.active::after 
{
	border:0 none;
}
.nav .sub li a
{
	background:none;
	padding:0;
	line-height:2em;
	height:auto;
	text-indent:10px;
	border-top:1px solid #e7e7e8;
	padding-right:35px;
	white-space:nowrap;
	font-weight:normal;
}
.nav .sub li:first-child a
{
	border-top:0 none;
}
.nav .sub li a:after
{
	display:none !important;
}
.nav .sub li a:hover
{
	background-color:$baseColor;
	color:$foreColor;
}
				

.sideNav-mobile-btn
{
    background-color:$baseColor;
    padding:4px;
    margin-bottom:4px;
    -webkit-border-radius: 4px;
    display:none;
    height:30px;
    font-size: 1.25em;
    line-height:30px;
    padding-left:14px;
    cursor:pointer;
    margin-bottom:30px;
    margin-top:-20px;
    color:$foreColor;
    position:relative;
    z-index:500;

    .mobile-nav 
    {
        border: 0 none;
        float: right;
        padding: 7px 10px;
        margin-right: 5px;
        margin-left: 5px;
        margin-top: 3px;
        color: white;
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);

        .icon-bar {
            display: block;
            width: 18px;
            height: 2px;
            background-color: whiteSmoke;
            -webkit-border-radius: 1px;
            -moz-border-radius: 1px;
            border-radius: 1px;
            -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
            -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
            box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
            }

        .icon-bar + .icon-bar
        {
            margin-top:3px;
        }
    }
}

// Side nav
.side-nav, 
.side-nav ul
{
	list-style:none;
	padding:0;
	margin-top:0;

	li
	{
		padding:0;
		margin:0;
		display:block;

		ul
		{
			margin-top:10px;
            
            ul
            {
                padding-left:10px;
                margin-left:2px;
                margin-top:0;
                margin-bottom:5px;
            }
		}

		a
		{
			font-size: 1.417em;
			line-height:1.58em;
			border-bottom:1px solid $greyBordercolor;
			max-width:175px;
			text-decoration:none;
			color:#373d3e;
			display:block;
			font-weight:bold;
			cursor:default;
		}

		li a
		{
			font-size:1.25em;
			border-bottom:0 none;
			display:inline;
			font-weight:normal;
			cursor:pointer;

            &:hover
            {
                text-decoration:underline;
            }
		}

		li.active
		{
			a
            {
                font-weight:bold;
                
			    &:hover
			    {
				    text-decoration:underline;
			    }
            }

            ul li a
            {
                font-weight:normal;
                color:#666;
                font-size:1.15em;
            }

            ul li.active a
            {
                font-weight:bold;
            }
		}
	}
}





.nav .title-bar
{
	
	height:40px;
	border-top:0 none !important;

	.back-btn
	{
		display: inline-block;
		padding: 0 12px;
		-webkit-border-radius: 6px;
		position: relative;
		padding-left: 0;
		margin-left: 16px;
		background-color:#717779;
		height:31px;
		line-height:31px;
		cursor: pointer;

		.caret
		{
			background-color:#717779;
			border-left: solid 1px rgba(79, 79, 79, 0);
			border-bottom: solid 1px rgba(79, 79, 79, 0);
			-webkit-border-top-left-radius: 6px;
			-webkit-border-bottom-right-radius: 6px;
			height: 25px;
			width: 25px;
			display: inline-block;
			-webkit-transform: rotate(45deg);
			position: absolute;
			left: -11px;
			top: 2px;
			-webkit-background-clip: content;
		}

		.label
		{
			position: relative;
			z-index: 10;
		}
	}

    &:hover
    {
        background-color:inherit;
    }
}

//Checkout Nav / Steps
.nav-checkout 
{
	padding-bottom:60px;

	ul{
		border-top: 4px solid #D2D2D3;
		border-bottom: 1px solid #D2D2D3;

		li
		{
			font-size:1.25em;
			cursor:default;
			padding:0 56px 0 28px;
			height:42px;
			line-height:42px;
			background:transparent url(/store/themes/blanc/images/backgrounds/cart-step.png) no-repeat 100% 0;

			&.active
			{
				color:#fff;
				background:$baseColor url(/store/themes/blanc/images/backgrounds/cart-step-active-tail.png) no-repeat 100% 0;
			}

			&.complete
			{
				background-color:$washout;
			}

			&.previous
			{
				background-image:url(/store/themes/blanc/images/backgrounds/cart-step-active-head.png);
				background-repeat:no-repeat;
				background-position:100% 0;
			}
		}
	}
}

.cart-nav-block 
{
	.ui-button
	{
		margin-bottom:10px;
		display: block;
	}
	
	.btn-paypal-express
	{
		float:left;
		clear:left;
	}
}


@media only screen and (min-width: 768px) and (max-width: 959px) 
{
	.nav.fixed
	{ 
		width: 768px!important;
		margin-left:-374px!important;
	}
}

@media only screen and (max-width: 767px), screen and (min-width: 480px) and (max-width: 767px) 
{
	
    .codagenic-category-listing .sideNav-mobile-btn,
    .codagenic-account-managment .sideNav-mobile-btn,
	.ui-button-mobile-nav
	{
		display:block;
	}

	.nav, 
	.nav.fixed
	{
		position:fixed;
		top:50px;
		width:auto !important;
		z-index:999;
		right:0;
		left:0;
		background-color:$baseColor;
        margin-left:0 !important;

		.nav-holder
		{
			margin:0 auto;
			width:300px;
			height:100%;
			overflow:hidden;
		}

		.primary
		{
			border-top:0 none;

			li
			{
				width:300px;
				float:none;
				border-top:1px solid #52585a;
			}
		}

		li a
		{

			line-height: 2.8em;
			color:$foreColor;
			height: auto;
			font-weight:bold;

			&:hover
			{
				background-color:#717779;
			}
		}

		li.sub > a
		{
			background-image:$rightArrowIconWhite;
			background-repeat:no-repeat;
			background-position:95% 49%;
			background-size:10px 13px;
		}

	}

	// Pointer
	.nav li.active:before,
	.nav li.active:after 
	{
		display: none;
	}
	
	// Sub navigation
	.nav .sub ul 
	{
		//margin-top:50px;
		visibility: visible;
		display:none;
		position:absolute;
		width:300px;
		top:24px;
		left:300px;
		opacity:1;
		background-color:$baseColor;

		&.in
		{
			display:block;
		}

		a
		{
			border-top:0 none;
			border-bottom:0 none;
			height:auto;
			line-height: 2.8em;
			font-weight:bold;

			&:hover
			{
				background-color:#717779;
			}
		}
	}

    .container .side-nav
    {
        position:absolute;
        display:none;
        top:35px;
        z-index:450;

		-webkit-border-bottom-left-radius: 6px;
		-webkit-border-bottom-right-radius: 6px;
        -webkit-background-clip: content;
        a
        {
            max-width:100%;
            display:block;
        }

        li ul
        {
            margin-top:0;
            padding-top:10px;
            background-color:$greyBordercolor;
        }

        > li > a,
        li ul li.active
        {
            display:none;
        }

        li li a
        {
            background-color:$greyBordercolor;
            padding:4px;
            text-indent:5px;

            &:hover
            {
                text-decoration:none;
                background-color:#999;
            }
        }
    }

	// No Checkout nav for mobile
	.nav-checkout
	{
		padding-bottom: 5px;
		
		ul li
		{
			display: none !important;
		}
	}

	// No Nav for checkout
	body.checkout .ui-button-mobile-nav
	{
		display: none;
	}


	.cart-nav-block .ui-button
	{		
		float:none;
        margin-left:0;
        margin-right:0;
	}

	// Override skeleton
	// This makes sure the mobile nav is hidden by default
	.container .nav,
	.container .nav.fixed
	{
		display:none;
	}
}


@media only screen and (min-width: 480px) and (max-width: 767px) 
{
	.nav,
	.nav.fixed 
	{
		margin-left:0;

        .nav-holder
		{
			width:420px;
		}

		.primary
		{
			li
			{
				width:420px;
			}
		}
	}

	.nav .sub ul
	{
		width:420px;
		left:420px;
	}

	.cart-nav-block
	{
		.send-left{float: left;}
		.send-right{float: right;}
	}
}
